<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= I18n.locale %>" lang="<%= I18n.locale %>">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="keywords" content="fanfiction, transformative works, otw, fair use, archive" />
  <meta name="language" content="en-US" />
  <meta name="subject" content="fandom" />
  <meta name="description" content="An Archive of Our Own, a project of the
  Organization for Transformative Works" />
  <meta name="distribution" content="GLOBAL" />
  <meta name="classification" content="transformative works" />
  <meta name="author" content="Organization for Transformative Works" />
  <title>
    <% if defined?(@page_title) %>
      <%= @page_title %>
    <% else %>
      <%=h ArchiveConfig.APP_NAME  %>
      <% unless ArchiveConfig.REVISION.blank? %>(rev. <%= ArchiveConfig.REVISION %>)<% end %>
      &raquo;
      <%= controller.controller_name %>
      <%= controller.action_name %>
      <% if defined?(@page_subtitle) %>
        &raquo;
        <%= @page_subtitle %>
      <% end %>
    <% end %>
  </title>

  <%= stylesheet_link_tag 'archive_core', 'yuletide', :cache => 'yuletide_cached', :media => 'all' %>
  </head>

  <body>
  <ul id="skiplinks"><li><a href="#main"><%=h ts('Main Content') %></a></li></ul>
  
  <div id="header">
    <h1>
      <%= link_to "Archive of Our Own", root_path %> | 
      <%= link_to @collection.title, static_collection_path(@collection) %>
    </h1>
    <ul class="dropdown_nav" id="nav">
      <li>
        <%= link_to "Fandoms &raquo;".html_safe, static_collection_fandoms_path(@collection) %>
        <ul>
          <li><%= link_to "All Fandoms", static_collection_fandoms_path(@collection) %></li>
          <% for medium in @media %>
          <li>
            <%= link_to medium.name, static_collection_medium_path(@collection, medium) %>
          </li>
          <% end %>
        </ul>
      </li>
      <li>
        <%= link_to "Locked Works", static_collection_restricted_works_path(@collection) %>
      </li>
    </ul>
  </div>

    <!-- BEGIN main -->
    <div id="main" class="<%= classes_for_main %>" role="main">
      <%= flash_div :error, :warning, :notice %>
      <%= yield  %>
      <div class="clear"><!--presentational--></div>
    </div>
    <!-- END main -->

    <script type="text/javascript" language="javascript">
    //<![CDATA[ 
    sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
    			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    		}
    	}
    }
    if (window.attachEvent) window.attachEvent("onload", sfHover);
    //]]>
    </script>

  </body>
</html>
